﻿@{
    Layout = null;
}
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/admin/style.css")" />
    <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/admin/fixed.css")" title="fixed" media="screen" />
    <title>古人坊摄影网站后台管理系统--登录</title>
    <!--[if lt IE 9]><script src="@Url.Content("~/Script/admin/html5.js")"></script><![endif]-->
    <!--[if !IE 7]><style>#wrap {display:table;height:100%}</style><![endif]-->
    <script type="text/javascript" src="@Url.Content("~/scripts/jquery-1.4.4.min.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/scripts/jquery.validate.min.js")"></script>
</head>
<body id="loginpage">
    <div class="container_16 clearfix">
        @*<div class="push_5 grid_6">
                <a href="#"><img src="images/biglogo.png" ></a>
            </div>
            <div class="clear"></div>*@
        <div class="widget push_5 grid_6" id="login">
            <div class="widget_title">
                <h2>
                    网站后台管理系统【登录】</h2>
            </div>
            <div class="widget_body">
                <div class="widget_content">
                    <form method="post" id="LoginForm" name="LoginForm">
                        <label class="block" for="username">
                            用户名:</label>
                        <input type="text" name="username" class="large" id="username" />
                        <label class="block" for="username" style="visibility:hidden; margin-top:3px; color:Red;">
                            </label>
                        <label class="block" for="password">
                            密码:</label>
                        <input type="password" name="password" class="large" id="password" />
                        <label class="block" for="password" style="visibility:hidden; margin-top:3px; color:Red;">
                            </label>
                        <div style="margin-top: 10px">
                            <label class="left">
                                <input type="checkbox" id="rememberMe" name="rememberMe" />记住我<br /> 
                                <span style="color:Red;">@ViewBag.Error</span>
                             </label>
                            <input class="btn right" type="submit" value="登录" id="btnSubmit" />
                        </div>
                        <div class="clear">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            var validator = $("#LoginForm").validate({
                rules: {
                    username: "required",
                    password: "required"
                },
                messages: {
                    username: {
                        required: "请输入用户名！"
                    },
                    password:{required:"请输入密码！"}

                },
                // the errorPlacement has to take the table layout into account
                errorPlacement: function (error, element) {
                    error.appendTo(element.next());
                    $(error).parent(0).css("visibility", "visible");
                },
                // specifying a submitHandler prevents the default submit, good for the demo
                submitHandler: function (form) {
                    form.submit();                    
                },
                // set this class to error-labels to indicate valid fields
                success: function (label) {
                    label.html("&nbsp;").addClass("checked").parent(0).css("display", "none"); // set &nbsp; as text for IE
                }
            });
            $("#btnSubmit").click(function () { $("#LoginForm").submit(); });
        })
    </script>
</body>
</html>
